// import {loadEnv} from "vite";

// import.meta.env.
// const env = loadEnv(mode, process.cwd(), "");
import { getToken } from "@/assets/utils/token";
import  CONNECT  from "@/service/url";
const token:any = getToken();
let strtoken:any =  encodeURIComponent(token)


export const sseUrl = {
    meun:`${CONNECT.baseUrl}/fada/E68891E79A84E5BA94E794A8?token=${strtoken}`,
    video:`${CONNECT.baseUrl}/fada/E68891E79A84E794B5E8AF9D?token=${strtoken}`,
    jmg:`https://192.168.0.2:4433/events?userId=dskjadksa`,
};

export function setUrl(val?: string) {
    let url =`${CONNECT.baseUrl}/fada/${val}?token=${strtoken}`
    return url 
    
}

export function setUrlParams(val?: string,params?:string) {
    console.log(val);
    let url =`${CONNECT.baseUrl}/fada/${val}?token=${strtoken}&fileName=${params}`
    return url 
    
}
